# --------------------------------
# -*- coding: utf-8 -*-
# Author: Zhu
# Time: 2021/12/13   
# Description:
# --------------------------------
from Common import Base
import time
from Common.GetLog import GetLog
from PageLocators.page_shippermanangement_loc import ele_SHIPPER_MANAGEMENT as loc
from Common.Base import Base

log = GetLog.get_logger()


class fun_SHIPPER_MANAGEMENT(Base):
    u'管理端-货主设置元素使用'

    def m_System_Menu(self):
        u'打开【系统设置】菜单'
        log.info("打开【系统设置】菜单")
        print("打开【系统设置】菜单")
        time.sleep(1)
        self.base_click(loc.ys_Click_SystemMenu)
        time.sleep(1)

    def m_Shipper_Management(self):
        u'打开【货主设置】页面'
        log.info("")
        print("")
        self.base_click(loc.ys_Click_Shipper)
        time.sleep(1)

    def m_Create_Shipper(self):
        u'点击【新建】货主按钮'
        log.info("点击【新建】货主按钮")
        print("点击【新建】货主按钮")
        self.base_click(loc.ys_Click_CreateShipper)
        time.sleep(1)

    def m_Input_ShipperInfo(self,ShipperBM,ShipperName,ShipperContact,ShipperContactPhone,ShipperPhoneGH,ShipperRemark,
                            ShipperAddress):
        u'输入新建货主信息'

        log.info("输入新建货主信息--输入货主编码")
        print("输入新建货主信息--输入货主编码")
        self.base_input(loc.ys_Input_ShipperBM,ShipperBM)
        time.sleep(1)


        log.info("输入货主名称")
        print("输入货主名称")
        self.base_input(loc.ys_Input_ShipperName,ShipperName)
        time.sleep(1)


        log.info("输入联系人")
        print("输入联系人")
        self.base_input(loc.ys_Input_ShipperContact,ShipperContact)
        time.sleep(1)


        log.info("输入联系人手机")
        print("输入联系人手机")
        self.base_input(loc.ys_Input_ShipperContactPhone,ShipperContactPhone)
        time.sleep(1)


        log.info("输入联系人固话")
        print("输入联系人固话")
        self.base_input(loc.ys_Input_ShipperPhoneGH,ShipperPhoneGH)
        time.sleep(1)


        log.info("输入备注")
        print("输入备注")
        self.base_input(loc.ys_Input_ShipperRemark,ShipperRemark)
        time.sleep(1)


        log.info("输入详细地址")
        print("输入详细地址")
        self.base_input(loc.ys_Input_ShipperAddress,ShipperAddress)
        time.sleep(1)


    def m_ShipperInfo_Submit(self):
        u'提交货主信息新建按钮'
        log.info("提交货主信息新建按钮")
        print("提交货主信息新建按钮")
        self.base_click(loc.ys_Submit_CreateShipper)
        time.sleep(1)



